// Server Side Menu

function ISaid( ply, saywhat )
local name = ply:Nick()
	if string.find(saywhat, "!tdm") == 1 then 
    umsg.Start( "MyMenu", ply )
	umsg.String(ply:Nick())
    umsg.End()
	/*
		local GetPlayers = player.GetAll()
		for k,v in pairs(GetPlayers) do
			if v:IsValid() then
				local GetScore4File = file.Read("TDM/GoalLimit/GoalLimit.txt")
				v:SetPData("TDM_Total_Score_Ok", GetScore4File)
				umsg.Start("PlaceScoreForMenu")
				umsg.Short(k)
				umsg.Short(GetScore4File)
				umsg.End()
			end
		end
	*/
	end
end
hook.Add( "PlayerSay", "ISaid", ISaid );


function MyMenu( ply )
    umsg.Start( "MyMenu", ply )
	umsg.String(ply:Nick())
    umsg.End()
	/*
	local GetPlayers = player.GetAll()
	for k,v in pairs(GetPlayers) do
		if v:IsValid() then
			local GetScore4File = file.Read("TDM/GoalLimit/GoalLimit.txt")
			v:SetPData("TDM_Total_Score_Ok", GetScore4File)
			umsg.Start("PlaceScoreForMenu")
			umsg.Short(k)
			umsg.Short(GetScore4File)
			umsg.End()
		end
	end
	*/
end
hook.Add("ShowTeam", "MyHook", MyMenu)


/*
function MyShopMenu( ply )
    umsg.Start( "ShowShopMenuXP", ply )
    umsg.End()
end
hook.Add("ShowHelp", "MyShopMenu", MyShopMenu)
*/


function tdm_help_message( ply )
    umsg.Start( "TDM_HELP_CONSOLE", ply )
    umsg.End()
end
concommand.Add( "tdm_help_message", tdm_help_message )